<template>
<el-container>
    <el-header style="height: 47px;">
      <p>财务数据统计</p>
    </el-header>
    <el-main>
      <el-row class="btn-group">
        <el-button  class="btn"  @click="handleDownloadfinacia">
          <span>导出</span><i class="el-icon-download"></i></el-button>
      </el-row>
      <el-table style="height: 100%"
       v-loading="loading"
       element-loading-text="给我一点时间"
       highlight-current-row stripe
       :data="tableDatas.list">
        <el-table-column fixed sortable align="center"  prop="orgname" label="单位名称" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="booked_date" label="统计日期" width="145"></el-table-column>
        <el-table-column sortable align="right" prop="ysmoney" label="应收金额" width="100"></el-table-column>
        <el-table-column sortable align="center" prop="cczfmoney" label="出场即时支付" width="170"></el-table-column>
        <el-table-column sortable align="center" prop="bjdrmoney" label="补交当天" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="bjdymoney" label="补交当月" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="bjwymoney" label="补交往月" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="owemoney" label="待确认费用" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="wxgzptmoney" label="微信公众平台" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="wxkfptmoney" label="微信开放平台" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="zfbmoney" label="支付宝" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="sshjmoney" label="实收合计" width="150"></el-table-column>
      </el-table>
    </el-main>
     <el-footer>
      <el-pagination
        background
        layout="total,sizes,prev,pager,next,jumper"
        :total="dataCount"
        :page-sizes="[10,20,30,50]"
        :page-size="dataPageSize"
        @current-change="handleCurrentChange"
        @size-change="handleSizeChange"
        style="margin-top: 10px;"
      ></el-pagination>
    </el-footer>
  </el-container>
</template>

<script>
  /* eslint-disable */
  export default {
    name: 'f-data-child-table',
    data() {
      return {
        labelPosition: 'left',
        pageNum: 1, // 当前页码
        dataCount: 0, // 数据总条数
        dataPageSize: 0, // 每页显示条数
        downloadLoading: false,
      }
    },
    props: ['loading', 'tableDatas'],
    watch: {
      pageNum: function(val) {
        this.$emit('pageNums', val)
      },
      tableDatas: function(val) {
        this.dataCount = val.count
        this.dataPageSize = val.pageSize
      }
    },
    methods: {
      handleCurrentChange: function(val) {
        this.pageNum = val
      },
      handleSizeChange(val) {
        this.$emit('sizePage', val)
      },
      handleDownloadfinacia() {
        this.downloadLoading=true
      }
    }
  }
</script>

<style scoped>
  .btn-group > .el-button span{
    display: none;
  }
  .btn-group > .el-button:hover{
    background-color: #409EFF;
  }
  .btn-group > .el-button:hover span{
    display: block;
  }
  .btn-group > .el-button:hover i{
    display: none;
  }
</style>
